import { Dictionary, SettingType } from '@/interface/Basic'
import { deepClone } from '@/utils/specificFunc'
export interface TableColumnType {
  IP: string
  AAF001: string
  operator: string
  savetime: string
  status: string
}
export const tableColumnDict: Dictionary<string> = {
  IP: 'IP',
  AAG001: '出厂编号',
  operator: '操作员',
  savetime: '保存时间',
  status: '状态'
}
export const module_settings: SettingType[] = [
  { label: '出厂编号', key: 'item0', value: '', type: 'input', disabled: true, unit: '' },
  {
    label: '产品型号',
    key: 'AAF601',
    value: '',
    type: 'select',
    options: [],
    disabled: true,
    unit: ''
  },
  {
    label: '通径',
    key: 'AAF701',
    value: '',
    type: 'select',
    options: [],
    disabled: true,
    unit: ''
  },
  {
    label: '公称压力',
    key: 'AAF801',
    value: '',
    type: 'select',
    options: [],
    disabled: true,
    unit: ''
  },
  { label: '气密性压力', key: 'item1', value: '', type: 'input', disabled: false, unit: 'KPa' },
  { label: '稳压时间', key: 'item2', value: '', type: 'input', disabled: false, unit: '分钟' },
  { label: '波动量', key: 'item3', value: '', type: 'input', disabled: false, unit: '±KPa' },
  { label: '压力设备', key: 'item4', value: '', type: 'input', disabled: false, unit: '' },
  { label: '概况', key: 'item5', value: '', type: 'textarea', disabled: false, unit: '' },
  { label: '备注', key: 'item6', value: '', type: 'textarea', disabled: false, unit: '' }
]
export const mockDdate = [
  '2021/10/30 8:55:25',
  '2021/10/30 8:55:26',
  '2021/10/30 8:55:27',
  '2021/10/30 8:55:28',
  '2021/10/30 8:55:29',
  '2021/10/30 8:55:30',
  '2021/10/30 8:55:31',
  '2021/10/30 8:55:32',
  '2021/10/30 8:55:33',
  '2021/10/30 8:55:34',
  '2021/10/30 8:55:35',
  '2021/10/30 8:55:36',
  '2021/10/30 8:55:37',
  '2021/10/30 8:55:38',
  '2021/10/30 8:55:39',
  '2021/10/30 8:55:40',
  '2021/10/30 8:55:41',
  '2021/10/30 8:55:42',
  '2021/10/30 8:55:43',
  '2021/10/30 8:55:44',
  '2021/10/30 8:55:45',
  '2021/10/30 8:55:46',
  '2021/10/30 8:55:47',
  '2021/10/30 8:55:48',
  '2021/10/30 8:55:49',
  '2021/10/30 8:55:50',
  '2021/10/30 8:55:51',
  '2021/10/30 8:55:52',
  '2021/10/30 8:55:54',
  '2021/10/30 8:55:55',
  '2021/10/30 8:55:56',
  '2021/10/30 8:55:57',
  '2021/10/30 8:55:58',
  '2021/10/30 8:55:59',
  '2021/10/30 8:56:00',
  '2021/10/30 8:56:01',
  '2021/10/30 8:56:02',
  '2021/10/30 8:56:03',
  '2021/10/30 8:56:04',
  '2021/10/30 8:56:05',
  '2021/10/30 8:56:06',
  '2021/10/30 8:56:07',
  '2021/10/30 8:56:08',
  '2021/10/30 8:56:09',
  '2021/10/30 8:56:10',
  '2021/10/30 8:56:11',
  '2021/10/30 8:56:12',
  '2021/10/30 8:56:13',
  '2021/10/30 8:56:14',
  '2021/10/30 8:56:15',
  '2021/10/30 8:56:16',
  '2021/10/30 8:56:17'
]
export const mockData = [
  7049.399, 7049.391, 7049.335, 7049.292, 7049.259, 7049.209, 7049.161, 7049.116, 7049.126,
  7049.124, 7049.136, 7049.142, 7049.123, 7049.104, 7049.117, 7049.077, 7049.056, 7049.077,
  7049.048, 7048.996, 7048.972, 7048.938, 7048.91, 7048.927, 7048.945, 7048.93, 7048.001, 7044.839,
  7034.991, 7022.611, 7008.542, 6993.82, 6978.033, 6960.487, 6936.385, 6904.96, 6866.216, 6813.706,
  6761.138, 6709.347, 6658.373, 6608.209, 6567.101, 6526.635, 6487.151, 6448.344, 6410.134,
  6372.537, 6335.52, 6298.736, 6262.489, 6227.13
]
export const mockChartData = {
  meter: 'WA119010004',
  xAxis: mockDdate,
  pressure: mockData,
  corrctedPressure: deepClone(mockData).map(item => Number((item - Math.random() * 500).toFixed(3)))
}
